package sensors.realSensors;

import pacman.Ghost;
import sensors.Sensor;
import sensors.UltrasonicSensor;

public class RealUltrasonicSensor extends Sensor implements UltrasonicSensor{
		
	public RealUltrasonicSensor(Ghost ghost){
		super(ghost);
	}

	
	public int getDistance() {
		lastReading = getGhost().getCommunicator().getDistance();
		return lastReading;
	}
	@Override
	public int getLastReading() {
		return lastReading;
	}
	
	
}
